package cc.w3d.jawos.apps.artiks.manager.client.beans;

import java.io.Serializable;

public enum ResourceType implements Serializable
{
	FOLDER  (0xFF000001),
	ARTICLE (0xFF000002);

	private final int resourceTypeId;

	private ResourceType(int resourceTypeId)
		{this.resourceTypeId = resourceTypeId;}

	public int toInt(){return resourceTypeId;}

	public static ResourceType getFromTypeId(int resourceTypeId)
	{
		for (ResourceType resourceType : ResourceType.values())
		{
			if(resourceType.toInt() == resourceTypeId)
				return resourceType;
		}
		return null;
	}
}
